package cn.itcast.bos.dao.base;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import cn.itcast.bos.domain.base.Standard;

public interface StandardRepository extends JpaRepository<Standard, Integer>{
     //根据收派名称查询
	List<Standard> findByName(String string);
     //query查询
	@Query(value="from Standard where name =?",nativeQuery=false)
	public List<Standard> queryName(String name);
	//带参数的update/delete
	@Query(value="update Standard set name =?2 where id = ?1")
	@Modifying
	public void updateName(Integer id,String name);
}
